
import urllib2
from layout import RESTAPILayout
import xml.etree.ElementTree as ET
"""
This class obtains the issues for us which we need. You instanciate the class
and then either call getIssue if you  are only looking for one or getIssues
if you wish to get your hands on a number of issues. I still need to implement
the caching feature so that we don't have to keep on going back to jira.
"""

class Issues:

    def __init__(self):
        return

    def getIssue(self, database, connector, query):
        layout = RESTAPILayout(database.getConnector(connector))
        url = layout.parse(query)
        data = Request(url)
        return data
